<template>
  <el-cord>
    <el-row>
      <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="id" label="id" width="80" />
        <el-table-column prop="password" label="password" width="120" />
        <el-table-column prop="userName" label="userName" width="120" />
        <el-table-column prop="createdAt" label="createdAt" width="400" />
        <el-table-column fixed="right" label="Operations" min-width="120">
          <template #default>
            <el-button link type="primary" size="small" @click="showDetail">
              Detail
            </el-button>
            <el-button link type="primary" size="small">Edit</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-row>
  </el-cord>
</template>
<script setup>
import { onMounted, ref } from "vue";
import { getData } from "@/api/user.js";
const tableData = ref([])
const getMysqlData = async () => {
  // let data = await window.electronAPI.getMysqlData();
  // if (data.code == 200) tableData.value = data.data;
  let res = await getData();
  console.log(90,res)
  if (res.data.code == 200) tableData.value = res.data.data;
};
onMounted(() => {
    getMysqlData()
})
</script>
